package hoangbn.apps;

import hoangbn.apps.adapter.PlaceAdapter;
import hoangbn.apps.util.Variables;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

public class PlacesActivity extends ListActivity {

	int Category;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Category = 1;
		this.setTitle(Variables.CATEGORIES[Category]);
		PlaceAdapter placeAdapter = new PlaceAdapter(this,
				R.layout.activity_place, Variables.PLACES[Category]);
		this.setListAdapter(placeAdapter);
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		Intent i = new Intent(this, MenuActivity.class);
		this.startActivity(i);
	}
}
